package LeetCode.ArrayMatrix;

public class Test2 {
    public static void main(String[] args) {
//        StringBuffer a = new StringBuffer("A");
//        StringBuffer b = new StringBuffer("B");
//        operator(a, b);
//        System.out.println(a + "," + b);
String str="";
        int  a = 22 ;
        int  b = 11 ;
        a = b + (b = a) * 0 ;
        System.out.println(a+" "+b);

        System.out.println(method1());

    }

    public static void operator(StringBuffer x, StringBuffer y) {
        x.append(y); y = x;
    }

    //Java_try {}里有一个return语句，
    // 那么紧跟在try后的finally{}是否执行？执行次序？
    //在return之前
    // 如果finally{}中也存在return语句，哪个return为准？
    //以finally为准
    //https://blog.csdn.net/Chill_Lyn/article/details/102654876?depth_1-utm_source=distribute.pc_relevant_right.none-task-blog-OPENSEARCH-2&utm_source=distribute.pc_relevant_right.none-task-blog-OPENSEARCH-2
    public static int method1(){
        try{
            return 9;
        }finally {
            System.out.println("finally");
            return 0;
        }

    }
}

 class Threads4{
    public static void main(String[] args){
        new Threads4().go();
    }
    public void go(){
        Runnable r=new Runnable(){
            public void run(){
                System.out.print("foo");
            }
        };
        Thread t=new Thread(r);
        t.start();
    }

}
